package com.xyd.entity;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "tb_user")
public class User implements Serializable {

    private int userid;
    private String username;
    private String password;
    private double salary;
    private String hiredate;

    public User() {
    }

    public User(String username, String password, double salary, String hiredate) {
        this.username = username;
        this.password = password;
        this.salary = salary;
        this.hiredate = hiredate;
    }

    public User(int userid, String username, String password, double salary, String hiredate) {
        this.userid = userid;
        this.username = username;
        this.password = password;
        this.salary = salary;
        this.hiredate = hiredate;
    }

    public User(String username, String hiredate) {
        this.username = username;
        this.hiredate = hiredate;
    }

    @Id
    @GeneratedValue
    @Column(name = "id")
    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "salary")
    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Column(name = "hiredate")
    public String getHiredate() {
        return hiredate;
    }

    public void setHiredate(String hiredate) {
        this.hiredate = hiredate;
    }
}
